package com.woniu.model.gh.common.enums.impl;

import com.woniu.model.gh.common.enums.IResultCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;


// 业务状态码
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum BusinessCode implements IResultCode {

    // 枚举对象：状态码，描述
    VERRIFY_CODE_IS_NULL(2100,"验证码为空"),
    VERRIFY_CODE_ERROR(21001,"验证码错误"),
    LOGIN_FAILED(21002,"用户名或密码错误，登录失败"),
    USER_EXISTS(21003,"用户已存在"),
    EMAIL_EXISTS(21004,"邮箱已存在"),
    CHINA_JSON_FAILED(21005,"地区信息转换JSON失败"),
    NO_LOGIN(21006,"未查询到登录身份"),
    STORAGE_IS_NOT_ENOUGH(21007,"库存不足"),
    ORDER_REPEAT_SUBMIT(21008,"订单已完成，请勿重复提交"),
    DICTIONARY_LIST_NULL(21008,"获取缓存中的数据字典集合为空");

    private int code;

    private String message;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
